
const {ccclass, property} = cc._decorator;

@ccclass
export default class Sprite extends cc.Component {

    // sprite move speed
    speed:number = 0;

    protected moveBy(duration: number, pos: cc.Vec2){
        this.node.runAction(cc.moveBy(duration, pos));
    }

    protected moveTo(pos: cc.Vec2){
//        this.node.runAction(cc.moveTo(0, pos));
        this.node.setPosition(pos.x, pos.y);
    }

    public render(dt){
    }
}
